package com.ktgj.service.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.service.mapper.OrderstatusTrackingMapper;
import com.ktgj.service.domain.OrderstatusTracking;
import com.ktgj.service.service.IOrderstatusTrackingService;

/**
 * 订单状态跟踪
Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-03
 */
@Service
public class OrderstatusTrackingServiceImpl implements IOrderstatusTrackingService 
{
    @Autowired
    private OrderstatusTrackingMapper orderstatusTrackingMapper;

    /**
     * 查询订单状态跟踪

     * 
     * @param orderTrackingId 订单状态跟踪
ID
     * @return 订单状态跟踪

     */
    @Override
    public OrderstatusTracking selectOrderstatusTrackingById(Long orderTrackingId)
    {
        return orderstatusTrackingMapper.selectOrderstatusTrackingById(orderTrackingId);
    }

    /**
     * 查询订单状态跟踪
列表
     * 
     * @param orderstatusTracking 订单状态跟踪

     * @return 订单状态跟踪

     */
    @Override
    public List<OrderstatusTracking> selectOrderstatusTrackingList(OrderstatusTracking orderstatusTracking)
    {
        return orderstatusTrackingMapper.selectOrderstatusTrackingList(orderstatusTracking);
    }

    /**
     * 新增订单状态跟踪

     * 
     * @param orderstatusTracking 订单状态跟踪

     * @return 结果
     */
    @Override
    public int insertOrderstatusTracking(OrderstatusTracking orderstatusTracking)
    {
        orderstatusTracking.setCreateTime(DateUtils.getNowDate());
        return orderstatusTrackingMapper.insertOrderstatusTracking(orderstatusTracking);
    }

    /**
     * 修改订单状态跟踪

     * 
     * @param orderstatusTracking 订单状态跟踪

     * @return 结果
     */
    @Override
    public int updateOrderstatusTracking(OrderstatusTracking orderstatusTracking)
    {
        orderstatusTracking.setUpdateTime(DateUtils.getNowDate());
        return orderstatusTrackingMapper.updateOrderstatusTracking(orderstatusTracking);
    }

    /**
     * 批量删除订单状态跟踪

     * 
     * @param orderTrackingIds 需要删除的订单状态跟踪
ID
     * @return 结果
     */
    @Override
    public int deleteOrderstatusTrackingByIds(Long[] orderTrackingIds)
    {
        return orderstatusTrackingMapper.deleteOrderstatusTrackingByIds(orderTrackingIds);
    }

    /**
     * 删除订单状态跟踪
信息
     * 
     * @param orderTrackingId 订单状态跟踪
ID
     * @return 结果
     */
    @Override
    public int deleteOrderstatusTrackingById(Long orderTrackingId)
    {
        return orderstatusTrackingMapper.deleteOrderstatusTrackingById(orderTrackingId);
    }
}
